//
//  CHSuperMenu.h
//  CarFile
//
//  Created by 陈浩 on 2018/1/22.
//  Copyright © 2018年 陈浩. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_OPTIONS(NSUInteger, MenuShowType) {
    MenuShowTypeNone = 0,
    MenuShowTypeTableView = 1 << 0,
    MenuShowTypeDatePicker = 1 << 1,
};

@class CHSuperMenu;

@protocol CHSuperMenuDataSource <NSObject>

//每个column有多少行
- (NSInteger)menu:(CHSuperMenu *)menu numberOfRowsInColumn:(NSInteger)column;
//每个column中每行的title
- (NSArray *)menu:(CHSuperMenu *)menu titleForRowInCoulumn:(NSInteger)column;

@end


@protocol CHSuperMenuDelegate <NSObject>
//点击
- (void)superMenu:(CHSuperMenu *)menu didSelectRowInCoulumn:(NSInteger)column backToResultDict:(NSMutableDictionary *)resutDic;



@end

@interface CHSuperMenu : UIView

@property (nonatomic ,weak) id<CHSuperMenuDelegate> delegate;

@property (nonatomic ,weak) id<CHSuperMenuDataSource> dataSource;

-(instancetype)initWithFrame:(CGRect)frame withTitles:(NSArray *)titles;

@end
